Skip to content

Conversation

@jianzhangbjz
Copy link

What this PR does / why we need it:

This commit introduces a new OLM plugin that provides debugging capabilities
for Operator Lifecycle Manager issues. The /olm:debug command analyzes
must-gather logs, correlates errors with source code, and searches for known
bugs in Jira's OCPBUGS project.

Key features:

  • Supports both OLMv0 and OLMv1 architectures
  • Automatically detects OCP version from must-gather logs
  • Clones appropriate repositories and checks out matching branches
  • Queries Jira for known bugs in OCPBUGS project (OLM component)
  • Generates comprehensive analysis reports with code references

Files added:

  • plugins/olm/.claude-plugin/plugin.json
  • plugins/olm/commands/debug.md
  • plugins/olm/README.md
  • Updated .claude-plugin/marketplace.json

Which issue(s) this PR fixes:

Fixes
This PR introduces a new OLM plugin that provides automated debugging capabilities for Operator Lifecycle Manager (OLM) issues in OpenShift clusters. The plugin
includes a /olm:debug command that combines must-gather log analysis, source code correlation, and Jira bug searching to streamline OLM troubleshooting.

Motivation

Debugging OLM issues currently requires manual correlation between:

  • Must-gather logs from customer clusters
  • OLM source code across multiple repositories
  • Known bugs in Jira (OCPBUGS project)

This process is time-consuming and error-prone. This plugin automates these steps, significantly reducing debugging time and improving accuracy.

The /olm:debug command accepts three parameters:
/olm:debug [olm-version]

  • issue-description: Brief description of the OLM issue
  • must-gather-path: Path to must-gather log directory
  • olm-version: Optional, either olmv0 (default) or olmv1

Automated Analysis Workflow

  1. OCP Version Detection: Automatically extracts OpenShift version from must-gather logs
  2. Repository Management:
    • OLMv0: Clones openshift/operator-framework-olm
    • OLMv1: Clones openshift/operator-framework-operator-controller and openshift/cluster-olm-operator
    • Checks out branches matching OCP version (e.g., release-4.14)
  3. Log Analysis: Extracts and analyzes OLM-related logs, errors, and stack traces
  4. Jira Integration:
    • Queries OCPBUGS project for OLM component bugs
    • Matches errors with known bugs using intelligent pattern matching
    • Categorizes matches by confidence (High/Medium/Low)
  5. Code Correlation: Maps errors to source code locations
  6. Report Generation: Creates comprehensive analysis with actionable recommendations

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

@openshift-ci openshift-ci bot requested review from bentito and enxebre October 24, 2025 10:41
@stbenjam
Copy link
Member

Testing the linter

@stbenjam stbenjam closed this Oct 27, 2025
@stbenjam stbenjam reopened this Oct 27, 2025
@jianzhangbjz
Copy link
Author

Hi @stbenjam , seems like it's pending for testing, anything else I need to do? Thanks!

@stbenjam
Copy link
Member

/test images

@stbenjam
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 29, 2025
{
"name": "olm",
"source": "./plugins/olm",
"description": "OLM (Operator Lifecycle Manager) debugging and analysis tools"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this highlight the version being used, in light of #76?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And is there a way to combine them in the same plugin and let claude detect what's available instead of having the user have to know?

@stbenjam
Copy link
Member

/lgtm cancel

A question now that there's 2 proposed OLM plugins for different versions

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jianzhangbjz
Once this PR has been reviewed and has the lgtm label, please ask for approval from stbenjam. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants